package cn.tanghom.framework.system.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/**
 * 实体父类
 * 
 * @author tanghom <tanghom@qq.com> 2015-11-18
 * 
 */
@MappedSuperclass
public abstract class BaseEntity implements Serializable {
    /**
     * 序列 化号
     */
    private static final long serialVersionUID = -540287793770056213L;

    /**
     * ID
     */
    @Column(name = "id", unique = true, nullable = false)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
  
    /**
     * ID 自动
     * 
     * @return
     */
    public Long getId() {
        return id;
    }

    /**
     * ID
     * 
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }
}
